package io.iot.pipeline.model;

import com.google.gson.Gson;
import io.netty.handler.codec.json.JsonObjectDecoder;

/**
 * 通用数据对象
 * @author cary
 */
public class OLikeProtocol {
    private int ctrlNo; // 集中器编号
    private int counterNo1; // 集抄器编号
    private int counterNo2; // 采集器编号
    private int unitNo; // 单元号
    private int buildingNo; // 楼号
    private int floorNo; // 楼层
    private int roomNo; // 房间号
    private int time; //采集时间
    private int pNo; // 协议编码
    private int pType; // 协议类型
    private IData data; // 表具数据

    public int getCtrlNo() {
        return ctrlNo;
    }

    public void setCtrlNo(int ctrlNo) {
        this.ctrlNo = ctrlNo;
    }

    public int getCounterNo1() {
        return counterNo1;
    }

    public void setCounterNo1(int counterNo1) {
        this.counterNo1 = counterNo1;
    }

    public int getCounterNo2() {
        return counterNo2;
    }

    public void setCounterNo2(int counterNo2) {
        this.counterNo2 = counterNo2;
    }

    public int getUnitNo() {
        return unitNo;
    }

    public void setUnitNo(int unitNo) {
        this.unitNo = unitNo;
    }

    public int getBuildingNo() {
        return buildingNo;
    }

    public void setBuildingNo(int buildingNo) {
        this.buildingNo = buildingNo;
    }

    public int getFloorNo() {
        return floorNo;
    }

    public void setFloorNo(int floorNo) {
        this.floorNo = floorNo;
    }

    public int getRoomNo() {
        return roomNo;
    }

    public void setRoomNo(int roomNo) {
        this.roomNo = roomNo;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getpNo() {
        return pNo;
    }

    public void setpNo(int pNo) {
        this.pNo = pNo;
    }

    public int getpType() {
        return pType;
    }

    public void setpType(int pType) {
        this.pType = pType;
    }

    public IData getData() {
        return data;
    }

    public void setData(IData data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}